﻿

$(document).ready(function() {

KE.show({
    id: 'ctl00_ContentPlaceHolder1_Tabs_Panel2_txtContentMember',
    imageUploadJson: '../../asp.net/upload_json.ashx',
    fileManagerJson: '../../asp.net/file_manager_json.ashx',
    allowFileManager: true,
    resizeMode: 1, //编辑器只能调整高度
            items: [
		'source', '|', 'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste',
		'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
		'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
		'superscript', '|', 'selectall', '-',
		'title', 'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold',
		'italic', 'underline', 'strikethrough', 'removeformat', '|', 'image',
		'flash', 'media', 'advtable', 'hr', 'link', 'unlink'],
    afterCreate: function(id) {
        KE.event.ctrl(document, 13, function() {
            KE.util.setData(id);
            document.forms['aspnetForm'].submit();
        });
        KE.event.ctrl(KE.g[id].iframeDoc, 13, function() {
            KE.util.setData(id);
            document.forms['aspnetForm'].submit();
        });
    }
});

KE.show({
    id: 'ctl00_ContentPlaceHolder1_Tabs_Panel3_txtContentNews',
    imageUploadJson: '../../asp.net/upload_json.ashx',
    fileManagerJson: '../../asp.net/file_manager_json.ashx',
    allowFileManager: true,
    resizeMode: 1, //编辑器只能调整高度
    items: [
		'source', '|', 'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste',
		'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
		'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
		'superscript', '|', 'selectall', '-',
		'title', 'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold',
		'italic', 'underline', 'strikethrough', 'removeformat', '|', 'image',
		'flash', 'media', 'advtable', 'hr', 'link', 'unlink'],
    afterCreate: function(id) {
        KE.event.ctrl(document, 13, function() {
            KE.util.setData(id);
            document.forms['aspnetForm'].submit();
        });
        KE.event.ctrl(KE.g[id].iframeDoc, 13, function() {
            KE.util.setData(id);
            document.forms['aspnetForm'].submit();
        });
    }
});

KE.show({
id: 'ctl00_ContentPlaceHolder1_Tabs_Panel4_txtContentAccount',
    imageUploadJson: '../../asp.net/upload_json.ashx',
    fileManagerJson: '../../asp.net/file_manager_json.ashx',
    allowFileManager: true,
    resizeMode: 1, //编辑器只能调整高度
    items: [
		'source', '|', 'fullscreen', 'undo', 'redo', 'print', 'cut', 'copy', 'paste',
		'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
		'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
		'superscript', '|', 'selectall', '-',
		'title', 'fontname', 'fontsize', '|', 'textcolor', 'bgcolor', 'bold',
		'italic', 'underline', 'strikethrough', 'removeformat', '|', 'image',
		'flash', 'media', 'advtable', 'hr', 'link', 'unlink'],
    afterCreate: function(id) {
        KE.event.ctrl(document, 13, function() {
            KE.util.setData(id);
            document.forms['aspnetForm'].submit();
        });
        KE.event.ctrl(KE.g[id].iframeDoc, 13, function() {
            KE.util.setData(id);
            document.forms['aspnetForm'].submit();
        });
    }
});

});

function AddCompanyNametab1(strCompanyName) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel1_txtContentPassword", strCompanyName);
}
function AddUserRealNametab1(strUserRealName) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel1_txtContentPassword", strUserRealName);
}
function AddUserAccounttab1(strAccount) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel1_txtContentPassword", strAccount);
}
function AddUserPasswordtab1(strUserPassword) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel1_txtContentPassword", strUserPassword);
}


function AddCompanyNametab2(strCompanyName) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel2_txtContentMember", strCompanyName);
}
function AddUserRealNametab2(strUserRealName) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel2_txtContentMember", strUserRealName);
}
function AddUserAccounttab2(strAccount) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel2_txtContentMember", strAccount);
}
function AddUserPasswordtab2(strUserPassword) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel2_txtContentMember", strUserPassword);
}


function AddUserRealNametab3(strCompanyName) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel3_txtContentNews", strCompanyName);
}
function AddNewsNametab3(strUserRealName) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel3_txtContentNews", strUserRealName);
}
function AddNewsContenttab3(strAccount) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel3_txtContentNews", strAccount);
}
function AddNewsResulttab3(strUserPassword) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel3_txtContentNews", strUserPassword);
}

function AddCompanyNametab4(strCompanyName) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel4_txtContentAccount", strCompanyName);
}
function AddUserNametab4(strUserRealName) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel4_txtContentAccount", strUserRealName);
}
function AddBeginTimetab4(strBeginTime) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel4_txtContentAccount", strBeginTime);
}
function EndTimetab4(strEndTime) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel4_txtContentAccount", strEndTime);
}
function AddMoneytab4(strMonry) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel4_txtContentAccount", strMonry);
}
function AddPaytab4(strPay) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel4_txtContentAccount", strPay);
}
function AddAllMoneytab4(strAllPay) {
    KE.insertHtml("ctl00_ContentPlaceHolder1_Tabs_Panel4_txtContentAccount", strAllPay);
}





function ValidPasswordData() {
    var txtPasswordValue = document.getElementById("ctl00_ContentPlaceHolder1_Tabs_Panel1_txtContentPassword");
    if (txtPasswordValue.value == "") {
        alert("邮件模版不能为空。");
        return false;
    }
    else {
        if (txtPasswordValue.value.indexOf("[#公司名称]") < 0) {
            alert("[#公司名称] 变量必须包含到邮件模版中。");
            return false;
        }
        return true;
     }

    
}
